/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufscar.compiladores.ast;

/**
 *
 * @author takeshi
 */
public class ProcedureCall extends Command{

    Procedure procedure;
    ExprList exprList;
    
    public ProcedureCall(Procedure procedure, ExprList exprList) {
        this.procedure = procedure;
        this.exprList = exprList;
    }
    
    @Override
    public void genC(PW pw) {
        pw.print(procedure.getName() + "(");
        if (exprList != null) {
            exprList.genC(pw);
        }
        pw.out.println(");");
    }
}
